<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="__ADMIN__/css/font.css">
<link rel="stylesheet" href="__ADMIN__/css/xadmin.css">
<script type="text/javascript" src="__ADMIN__/js/jquery.min.js"></script>
<script type="text/javascript" src="__ADMIN__/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="__ADMIN__/js/xadmin.js"></script>
<script type="text/javascript" src="__ADMIN__/js/cookie.js"></script>
<link rel="stylesheet" href="/static/admin/css/font.css">
<link rel="stylesheet" href="/static/admin/css/font-awesome.min.css">
<style>
.layui-form-item .layui-form-label{
    width: 120px;
}
.layui-form-item .layui-textarea{
    width: 190px;
}
#phone-one-div {display: none}
.layui-form-select {z-index: 99999 !important}
.layui-upload-file{display:block !important}

</style>
</head>

<body>
<div class="x-body">
<form class="layui-form" action="">

<table class="layui-table" lay-size="sm">
  <colgroup>
    <col width="200">
    <col>
  </colgroup>
  <tbody>
    <tr>
      <td>活动名称</td>
      <td>{$data.activity_name}</td>
    </tr>
    <tr>
      <td>活动日期</td>
      <td>{:date('Y-m-d',$data.activity_start_time)} - {:date('Y-m-d',$data.activity_end_time)}</td>
    </tr>
    <tr>
      <td>活动时间</td>
      <td>{:date('H:i:s',$data.activity_start_time)} - {:date('H:i:s',$data.activity_end_time)}</td>
    </tr>
    <tr>
      <td>活动地区</td>
      <td>{$data.province}{$data.city}{$data.county}</td>
    </tr>
    <tr>
      <td>活动场馆</td>
      <td>{$data.activity_venues}</td>
    </tr>
    <tr>
      <td>活动地址</td>
      <td>{$data.activity_address}</td>
    </tr>
    <tr>
      <td>设备需求</td>
      <td>{$data.activity_need_device}</td>
    </tr>
    <tr>
      <td>外请直播联系人</td>
      <td>{$data.liveer_name}</td>
    </tr>
    <tr>
      <td>外请直播联系电话</td>
      <td>{$data.liveer_phone}</td>
    </tr>
    <tr>
      <td>价格</td>
      <td>{$data.liveer_price}</td>
    </tr>
    <tr>
      <td>转账日期 </td>
      <td>
          <input type="text" name="settle_date" id="settle_date" value="{:date('Y-m-d')}" autocomplete="off" class="layui-input">
      </td>
    </tr>
    <tr>
      <td>转账方式 <span class="x-red">*</span></td>
      <td>
      <input type="radio" name="jie_method" value="公转" title="公转"  lay-verify="required" required >
      <input type="radio" name="jie_method" value="私转" title="私转" lay-verify="required" required {:session('uid','','admin')  == 12 ? 'checked':''}>
      </td>
    </tr>
    <tr>
      <td>转账账号 <span class="x-red">*</span></td>
      <td>      
      <input type="radio" name="transferor" value="雪鲸" title="雪鲸" >
      <input type="radio" name="transferor" value="可赞" title="可赞" >
      <input type="radio" name="transferor" value="东创" title="东创" >
      <input type="radio" name="transferor" value="星权" title="星权" >
      <br>
      <input type="radio" name="transferor" value="徐涛" title="徐涛" lay-verify="required" required >
      <input type="radio" name="transferor" value="徐操" title="徐操" lay-verify="required" required >
      <input type="radio" name="transferor" value="文子" title="文子" lay-verify="required" required {:session('uid','','admin')  == 12 ? 'checked':''}>
      </td>
    </tr>
    <tr>
      <td>实际结算金额 <span class="x-red">*</span></td>
      <td><input type="text" name="jie_price" id="jie_price" lay-verify="required" required value="" class="layui-input"  placeholder="如有增减金额，请备注详细原因"></td>
    </tr>
    <tr>
      <td>结算备注</td>
      <td><textarea name="jie_remark" id="jie_remark" placeholder="如有增减金额，请备注详细原因" class="layui-input"></textarea></td>
    </tr>

    <tr>
        <td>上传发票/收据（图）</td>
        <td> 
            <a href="" target="_blank"><img id="img" src="" width="250px" style="margin-top: 5px;display: block;"></a>
            <input type="hidden" name="bill_image" id="bill_image"  value="" />
            <button type="button" style="width: 140px;" class="layui-btn layui-btn-sm layui-btn-normal" id="uploads">上传图片</button>
        </td>
    </tr>
    <tr>
        <td>上传转账凭证（图）</td>
        <td>
            <a href="" target="_blank"><img id="img_" src="" width="250px" style="margin-top: 5px;display: block;"></a>
            <input type="hidden" name="voucher_image" id="voucher_image" value="" />
            <button type="button" style="width: 140px;" class="layui-btn layui-btn-sm layui-btn-normal" id="uploads_">上传图片</button>
        </td>
    </tr>
    <tr>
      <td colspan="2" align="center">    
        <button type="button" class="layui-btn" lay-filter="add" lay-submit="">确定</button>
      </td>
    </tr>
  </tbody>
</table>
<input type="hidden" name="id" value="{$data.id}">

<input type="hidden" name="step" value="5">

</form>
</div>
<script>

    
    
layui.use(['form','layer','laydate','upload','layarea','rate'], function(){
    var $ = layui.jquery;
    var form = layui.form
    ,layer = layui.layer
    ,laydate = layui.laydate
    ,upload = layui.upload
    ,layarea = layui.layarea
    ,rate = layui.rate;
    laydate.render({
        elem: '#settle_date'
    });
    var uploadInst = upload.render({
          elem: '#uploads'
          , url: '{:url("DataTable/upload")}'
          , before: function (obj) {
            //预读本地文件示例，不支持ie8
            obj.preview(function (index, file, result){
                //如果有图片再点击上传就撤销原来的图片
                var img=$("#img").attr("src");
                var imgurl=$("#bill_image").val();
                $('#img').attr('src', result); //图片链接(base64)
            });
          }
          , done: function (res) {
              //如果上传失败
              if (res.code == 0) {
                  return layer.msg(res.err);
              }
              //上传成功
              if(res.code == 1) {
                  $('#img').attr('src','/uploads/jiesuan/'+res.savename);
                  $('#img').parent('a').attr('href','/uploads/jiesuan/'+res.savename);
                  $('#bill_image').attr('value','/uploads/jiesuan/'+res.savename);
              }
          }
    });
    var uploadInst1 = upload.render({
          elem: '#uploads_'
          , url: '{:url("DataTable/upload")}'
          , before: function (obj) {
            //预读本地文件示例，不支持ie8
            obj.preview(function (index, file, result){
                //如果有图片再点击上传就撤销原来的图片
                var img=$("#img_").attr("src");
                var imgurl=$("#voucher_image").val();
                $('#img_').attr('src', result); //图片链接(base64)
            });
          }
          , done: function (res) {
              //如果上传失败
              if (res.code == 0) {
                  return layer.msg(res.err);
              }
              //上传成功
              if(res.code == 1) {
                  $('#img_').attr('src','/uploads/jiesuan/'+res.savename);
                  $('#img_').parent('a').attr('href','/uploads/jiesuan/'+res.savename);
                  $('#voucher_image').attr('value','/uploads/jiesuan/'+res.savename);
              }
          }
    });
      
      
      
      
    form.on('submit(add)', function(data){
        $.ajax({
            type:'POST',
            dataType:'json',
            data:data.field,
            url:'{:url('liveProcessAdd')}?id={$data.id}',
            success:function(obj){
                  layer.alert(obj.msg, {icon: obj.icon},function(){
                    // 获得frame索引
                    var index = parent.layer.getFrameIndex(window.name);
                    //关闭当前frame
                    parent.layer.close(index);
                    // 可以对父窗口进行刷新 
                    x_admin_father_reload();
                  });    
            }
        });
        return false;
    });

});
    </script>
  </body>

</html>